package com.example.hospital_208.service.impl;

import com.example.hospital_208.dao.DoctorFeeDao;
import com.example.hospital_208.po.DoctorFee;
import com.example.hospital_208.service.DoctorFeeService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoctorFeeServiceImpl implements DoctorFeeService {

    private final DoctorFeeDao doctorFeeDao;

    public DoctorFeeServiceImpl(DoctorFeeDao doctorFeeDao) {
        this.doctorFeeDao = doctorFeeDao;
    }

    @Override
    public List<DoctorFee> listFees() {
        return doctorFeeDao.findAllFees();
    }

    @Override
    public DoctorFee getFeeById(Integer fee_id) {
        return doctorFeeDao.findFeeById(fee_id);
    }

    @Override
    public int addFee(DoctorFee fee) {
        return doctorFeeDao.insertFee(fee);
    }

    @Override
    public int updateFee(DoctorFee fee) {
        return doctorFeeDao.updateFee(fee);
    }

    @Override
    public int disableFee(Integer fee_id) {
        return doctorFeeDao.disableFee(fee_id);
    }
}